package com.webside.wap.common.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.webside.base.basemapper.BaseMapper;
import com.webside.wap.common.model.Bdictionary;
import com.webside.loginfo.model.LogInfoEntity;

/**
 * @author XuanZhen XYH
 * @see 首页 进行各种条件查询
 */
@Repository
public interface BdictionaryMapper extends BaseMapper<LogInfoEntity, Long> {
	/**
	 * 通过查询code返回Bdictionary获取type等需要的属性 
	 * @param code
	 * @return
	 */
	List<Bdictionary> queryByCode(@Param("code")String code);

	/**
	 * 通过传递的 Bdictionary对象的code type进行查询
	 * sort by ${sort} ASC
	 * @param bdictionary
	 * @return
	 */
	List<Bdictionary> queryByTypeAndCodeAsc(@Param("bdictionary")Bdictionary bdictionary,@Param("sort")String sort);

	/**
	 * 通过传递的 Bdictionary对象的code type进行查询
	 * sort by ${sort} DESC
	 * @param bdictionary
	 * @return
	 */
	List<Bdictionary> queryByTypeAndCodeDesc(@Param("bdictionary")Bdictionary bdictionary,@Param("sort")String sort);
}
